package o;

import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import java.lang.ref.WeakReference;
import o.dbm.c;

public class dby extends cku {
    private boolean ˊॱ = true;
    private e ॱ;
    private String ॱˊ;

    public interface e {
        void ˋ(boolean z);

        void ॱ();
    }

    static class b implements ewa {
        private WeakReference<dby> ˎ;
        private CheckBox ˏ;

        public b(dby o_dby, CheckBox checkBox) {
            this.ˎ = new WeakReference(o_dby);
            this.ˏ = checkBox;
        }

        public void ˏ(Activity activity, DialogInterface dialogInterface, int i) {
            if (this.ˎ != null) {
                dby o_dby = (dby) this.ˎ.get();
                if (o_dby != null) {
                    e ˋ = o_dby.ॱ;
                    if (ˋ == null) {
                        return;
                    }
                    if (-1 == i) {
                        ˋ.ˋ(this.ˏ.isChecked());
                    } else {
                        ˋ.ॱ();
                    }
                }
            }
        }

        public void ˊ(Activity activity, DialogInterface dialogInterface) {
            if (this.ˎ != null) {
                dby o_dby = (dby) this.ˎ.get();
                if (o_dby != null) {
                    e ˋ = o_dby.ॱ;
                    if (ˋ != null) {
                        ˋ.ॱ();
                    }
                }
            }
        }
    }

    public static dby ˏ(String str) {
        dby o_dby = new dby();
        o_dby.ˋ(str);
        return o_dby;
    }

    public void ˋ(e eVar) {
        this.ॱ = eVar;
    }

    public void ˎ(boolean z) {
        this.ˊॱ = z;
    }

    private void ˋ(String str) {
        this.ॱˊ = str;
    }

    public Dialog onCreateDialog(Bundle bundle) {
        int i = 0;
        View inflate = LayoutInflater.from(getActivity()).inflate(o.dbm.b.ˊ, null);
        int ˎ = ewb.ˎ(getActivity());
        inflate.setPadding(ˎ, 0, ˎ, 0);
        ((TextView) inflate.findViewById(o.dbm.e.ˎ)).setText(this.ॱˊ);
        CheckBox checkBox = (CheckBox) inflate.findViewById(o.dbm.e.ˋ);
        checkBox.setText(c.ˋ);
        if (!this.ˊॱ) {
            i = 8;
        }
        checkBox.setVisibility(i);
        ˊ(inflate);
        ˎ(-3, 8);
        ˋ(new b(this, checkBox));
        return super.onCreateDialog(bundle);
    }
}
